package com.flw.eslab.dto;

import java.util.Date;

import com.flw.eslab.model.Task;

public class Task_Dto {
	private Integer id;
	private String contend;
	private String state;
	
	private int endYear;
	private int  endMonth;
	private int endDay;
	private int startYear;
	private int  startMonth;
	private int startDay;
	
	private Date toDate(int year,int month,int day){
		return new Date(year,month,day);
	}
	public Task toTask(){
		Task task=new Task();
		task.setId(id);
		task.setContend(contend);
		task.setState(state);
		task.setStartDate(toDate(startYear,startMonth,startDay));
		task.setEndDate(toDate(endYear,endMonth,endDay));
		return task;
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getContend() {
		return contend;
	}
	public void setContend(String contend) {
		this.contend = contend;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public int getEndYear() {
		return endYear;
	}
	public void setEndYear(int endYear) {
		this.endYear = endYear;
	}
	public int getEndMonth() {
		return endMonth;
	}
	public void setEndMonth(int endMonth) {
		this.endMonth = endMonth;
	}
	public int getEndDay() {
		return endDay;
	}
	public void setEndDay(int endDay) {
		this.endDay = endDay;
	}
	public int getStartYear() {
		return startYear;
	}
	public void setStartYear(int startYear) {
		this.startYear = startYear;
	}
	public int getStartMonth() {
		return startMonth;
	}
	public void setStartMonth(int startMonth) {
		this.startMonth = startMonth;
	}
	public int getStartDay() {
		return startDay;
	}
	public void setStartDay(int startDay) {
		this.startDay = startDay;
	}
	
	
	

}
